home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1992-09-19 | 2.0 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: newhdr.c
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Fri Sep 18 22:12:19 1992, modified Fri Sep 18 22:12:19 1992, creator 'MPS ', type ASCII, 1353 bytes "newhdr.c" , at 0x5c9 428 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 6e 65 77 68 64 72 | 2e 63 00 00 00 00 00 00 |..newhdr|.c......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 05 49 00 | 00 01 ac a6 e0 3d 03 a6 |......I.|.....=..|
|00000060| e0 3d 03 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.=......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 4f c3 00 00 |........|....O...|
|00000080| 2f 2a 0d 20 2a 20 49 6e | 74 65 72 6d 65 64 69 61 |/*. * In|termedia|
|00000090| 74 65 20 70 72 6f 67 72 | 61 6d 20 74 6f 20 63 6f |te progr|am to co|
|000000a0| 6e 76 65 72 74 20 69 63 | 6f 6e 78 2e 68 64 72 20 |nvert ic|onx.hdr |
|000000b0| 69 6e 74 6f 20 61 20 68 | 65 61 64 65 72 20 66 69 |into a h|eader fi|
|000000c0| 6c 65 20 66 6f 72 20 69 | 6e 63 6c 75 73 69 6f 6e |le for i|nclusion|
|000000d0| 0d 20 2a 20 69 6e 20 69 | 63 6f 6e 74 2e 20 20 54 |. * in i|cont. T|
|000000e0| 68 69 73 20 65 6c 69 6d | 69 6e 61 74 65 73 20 61 |his elim|inates a|
|000000f0| 20 63 6f 6d 70 69 6c 65 | 2d 74 69 6d 65 20 66 69 | compile|-time fi|
|00000100| 6c 65 20 73 65 61 72 63 | 68 20 6f 6e 20 55 4e 49 |le searc|h on UNI|
|00000110| 58 20 73 79 73 74 65 6d | 73 2e 0d 20 2a 20 44 65 |X system|s.. * De|
|00000120| 66 69 6e 69 74 69 6f 6e | 20 6f 66 20 48 65 61 64 |finition| of Head|
|00000130| 65 72 20 61 63 74 69 76 | 61 74 65 73 20 74 68 65 |er activ|ates the|
|00000140| 20 69 6e 63 6c 75 73 69 | 6f 6e 2e 0d 20 2a 2f 0d | inclusi|on.. */.|
|00000150| 0d 23 69 6e 63 6c 75 64 | 65 20 22 3a 3a 68 3a 67 |.#includ|e "::h:g|
|00000160| 73 75 70 70 6f 72 74 2e | 68 22 0d 0d 2f 2a 0d 20 |support.|h"../*. |
|00000170| 2a 20 50 72 6f 74 6f 74 | 79 70 65 0d 20 2a 2f 0d |* Protot|ype. */.|
|00000180| 0d 6e 6f 76 61 6c 75 65 | 09 70 75 74 62 79 74 65 |.novalue|.putbyte|
|00000190| 09 50 61 72 61 6d 73 28 | 28 69 6e 74 20 62 29 29 |.Params(|(int b))|
|000001a0| 3b 0d 0d 23 69 66 64 65 | 66 20 48 65 61 64 65 72 |;..#ifde|f Header|
|000001b0| 0d 6d 61 69 6e 28 61 72 | 67 63 2c 20 61 72 67 76 |.main(ar|gc, argv|
|000001c0| 29 20 0d 69 6e 74 20 61 | 72 67 63 3b 0d 75 6e 73 |) .int a|rgc;.uns|
|000001d0| 69 67 6e 65 64 20 63 68 | 61 72 20 2a 61 72 67 76 |igned ch|ar *argv|
|000001e0| 5b 5d 3b 0d 20 20 20 7b | 0d 20 20 20 69 6e 74 20 |[];. {|. int |
|000001f0| 62 2c 20 6e 3b 0d 20 0d | 20 20 20 2f 2a 0d 20 20 |b, n;. .| /*. |
|00000200| 20 20 2a 20 43 72 65 61 | 74 65 20 61 6e 20 61 72 | * Crea|te an ar|
|00000210| 72 61 79 20 6c 61 72 67 | 65 20 65 6e 6f 75 67 68 |ray larg|e enough|
|00000220| 20 74 6f 20 68 6f 6c 64 | 20 69 63 6f 6e 78 2e 68 | to hold| iconx.h|
|00000230| 64 72 20 28 2b 31 20 66 | 6f 72 20 6c 75 63 6b 29 |dr (+1 f|or luck)|
|00000240| 0d 20 20 20 20 2a 20 54 | 68 69 73 20 61 72 72 61 |. * T|his arra|
|00000250| 79 20 73 68 61 6c 6c 20 | 62 65 20 69 6e 63 6c 75 |y shall |be inclu|
|00000260| 64 65 64 20 62 79 20 6c | 69 6e 6b 2e 63 20 28 61 |ded by l|ink.c (a|
|00000270| 6e 64 20 69 73 20 6e 6f | 6d 69 6e 61 6c 6c 79 20 |nd is no|minally |
|00000280| 63 61 6c 6c 65 64 0d 20 | 20 20 20 2a 20 68 64 72 |called. | * hdr|
|00000290| 2e 68 29 0d 20 20 20 20 | 2a 2f 20 0d 20 20 20 70 |.h). |*/ . p|
|000002a0| 72 69 6e 74 66 28 22 73 | 74 61 74 69 63 20 75 6e |rintf("s|tatic un|
|000002b0| 73 69 67 6e 65 64 20 63 | 68 61 72 20 69 63 6f 6e |signed c|har icon|
|000002c0| 78 68 64 72 5b 4d 61 78 | 48 64 72 2b 31 5d 20 3d |xhdr[Max|Hdr+1] =|
|000002d0| 20 7b 5c 6e 22 29 3b 0d | 0d 20 20 20 2f 2a 0d 20 | {\n");.|. /*. |
|000002e0| 20 20 20 2a 20 52 65 63 | 72 65 61 74 65 20 69 63 | * Rec|reate ic|
|000002f0| 6f 6e 78 2e 68 64 72 20 | 61 73 20 61 20 73 65 72 |onx.hdr |as a ser|
|00000300| 69 65 73 20 6f 66 20 68 | 65 78 20 63 6f 6e 73 74 |ies of h|ex const|
|00000310| 61 6e 74 73 2c 20 70 61 | 64 64 65 64 20 77 69 74 |ants, pa|dded wit|
|00000320| 68 20 7a 65 72 6f 20 62 | 79 74 65 73 2e 0d 20 20 |h zero b|ytes.. |
|00000330| 20 20 2a 2f 0d 0d 20 20 | 20 66 6f 72 20 28 6e 20 | */.. | for (n |
|00000340| 3d 20 30 3b 20 28 62 20 | 3d 20 67 65 74 63 68 61 |= 0; (b |= getcha|
|00000350| 72 28 29 29 20 21 3d 20 | 45 4f 46 3b 20 6e 2b 2b |r()) != |EOF; n++|
|00000360| 29 0d 20 20 20 20 20 20 | 70 75 74 62 79 74 65 28 |). |putbyte(|
|00000370| 62 29 3b 0d 0d 20 20 20 | 69 66 20 28 6e 20 3e 20 |b);.. |if (n > |
|00000380| 4d 61 78 48 64 72 29 20 | 7b 0d 20 20 20 20 20 20 |MaxHdr) |{. |
|00000390| 66 70 72 69 6e 74 66 28 | 73 74 64 65 72 72 2c 20 |fprintf(|stderr, |
|000003a0| 22 25 73 3a 20 66 69 6c | 65 20 73 69 7a 65 20 69 |"%s: fil|e size i|
|000003b0| 73 20 25 64 20 62 79 74 | 65 73 20 62 75 74 20 4d |s %d byt|es but M|
|000003c0| 61 78 48 64 72 20 69 73 | 20 6f 6e 6c 79 20 25 64 |axHdr is| only %d|
|000003d0| 5c 6e 22 2c 0d 20 20 20 | 20 20 20 20 20 20 61 72 |\n",. | ar|
|000003e0| 67 76 5b 30 5d 2c 20 6e | 2c 20 4d 61 78 48 64 72 |gv[0], n|, MaxHdr|
|000003f0| 29 3b 0d 20 20 20 20 20 | 20 75 6e 6c 69 6e 6b 28 |);. | unlink(|
|00000400| 22 68 64 72 2e 68 22 29 | 3b 0d 20 20 20 20 20 20 |"hdr.h")|;. |
|00000410| 65 78 69 74 28 45 72 72 | 6f 72 45 78 69 74 29 3b |exit(Err|orExit);|
|00000420| 0d 20 20 20 20 20 20 7d | 0d 0d 20 20 20 77 68 69 |. }|.. whi|
|00000430| 6c 65 20 28 6e 2b 2b 20 | 3c 20 4d 61 78 48 64 72 |le (n++ |< MaxHdr|
|00000440| 29 0d 20 20 20 20 20 20 | 70 75 74 62 79 74 65 28 |). |putbyte(|
|00000450| 30 29 3b 0d 0d 20 20 20 | 70 72 69 6e 74 66 28 22 |0);.. |printf("|
|00000460| 30 78 30 30 7d 3b 5c 6e | 22 29 3b 09 09 09 2f 2a |0x00};\n|");.../*|
|00000470| 20 6f 6e 65 20 6d 6f 72 | 65 2c 20 73 61 6e 73 20 | one mor|e, sans |
|00000480| 63 6f 6d 6d 61 2c 20 61 | 6e 64 20 66 69 6e 69 73 |comma, a|nd finis|
|00000490| 68 20 2a 2f 0d 20 20 20 | 65 78 69 74 28 4e 6f 72 |h */. |exit(Nor|
|000004a0| 6d 61 6c 45 78 69 74 29 | 3b 0d 20 20 20 7d 0d 0d |malExit)|;. }..|
|000004b0| 2f 2a 20 70 75 74 62 79 | 74 65 28 62 29 20 2d 20 |/* putby|te(b) - |
|000004c0| 6f 75 74 70 75 74 20 62 | 79 74 65 20 62 20 61 73 |output b|yte b as|
|000004d0| 20 74 77 6f 20 68 65 78 | 20 64 69 67 69 74 73 20 | two hex| digits |
|000004e0| 2a 2f 0d 6e 6f 76 61 6c | 75 65 20 70 75 74 62 79 |*/.noval|ue putby|
|000004f0| 74 65 28 62 29 0d 69 6e | 74 20 62 3b 0d 20 20 20 |te(b).in|t b;. |
|00000500| 7b 0d 20 20 20 73 74 61 | 74 69 63 20 69 6e 74 20 |{. sta|tic int |
|00000510| 6e 20 3d 20 30 3b 0d 0d | 20 20 20 70 72 69 6e 74 |n = 0;..| print|
|00000520| 66 28 22 30 78 25 30 32 | 78 2c 22 2c 20 62 20 26 |f("0x%02|x,", b &|
|00000530| 20 30 78 46 46 29 3b 0d | 20 20 20 69 66 20 28 2b | 0xFF);.| if (+|
|00000540| 2b 6e 20 3d 3d 20 31 36 | 29 20 7b 0d 20 20 20 20 |+n == 16|) {. |
|00000550| 20 20 70 72 69 6e 74 66 | 28 22 5c 6e 22 29 3b 0d | printf|("\n");.|
|00000560| 20 20 20 20 20 20 6e 20 | 3d 20 30 3b 0d 20 20 20 | n |= 0;. |
|00000570| 20 20 20 7d 0d 20 20 20 | 7d 0d 0d 23 65 6c 73 65 | }. |}..#else|
|00000580| 09 09 09 09 09 2f 2a 20 | 48 65 61 64 65 72 20 2a |...../* |Header *|
|00000590| 2f 0d 0d 6d 61 69 6e 28 | 29 0d 20 20 20 7b 0d 20 |/..main(|). {. |
|000005a0| 20 20 65 78 69 74 28 30 | 29 3b 0d 20 20 20 7d 0d | exit(0|);. }.|
|000005b0| 0d 23 65 6e 64 69 66 09 | 09 09 09 09 2f 2a 20 48 |.#endif.|..../* H|
|000005c0| 65 61 64 65 72 20 2a 2f | 0d 00 00 00 00 00 00 00 |eader */|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000600| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00000610| 00 00 0b 73 15 46 69 6c | 65 4e 61 6d 65 55 6e 69 |...s.Fil|eNameUni|
|00000620| 78 54 6f 4d 61 63 2e 63 | 2e 6f 02 00 00 00 4f 42 |xToMac.c|.o....OB|
|00000630| 08 6e 65 77 68 64 72 2e | 63 00 02 00 00 00 54 45 |.newhdr.|c.....TE|
|00000640| 58 54 4d 50 53 20 00 00 | 00 00 00 00 00 00 00 00 |XTMPS ..|........|
|00000650| 00 00 54 45 58 54 4d 50 | 53 20 00 00 00 00 00 00 |..TEXTMP|S ......|
|00000660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000670| 00 00 a6 e0 04 c3 00 00 | 05 49 00 00 01 ac 00 00 |........|.I......|
|00000680| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000690| 00 00 0b 73 15 46 69 6c | 65 4e 61 6d 65 55 6e 69 |...s.Fil|eNameUni|
|000006a0| 78 54 6f 4d 61 63 2e 63 | 2e 6f 02 00 00 00 4f 42 |xToMac.c|.o....OB|
|000006b0| 4a 20 4d 50 53 20 00 00 | 00 00 00 00 00 00 00 00 |J MPS ..|........|
|000006c0| 0d 8b 00 00 00 00 04 08 | 00 00 08 00 00 00 00 00 |........|........|
|000006d0| 00 00 00 00 00 00 a4 2e | 22 c5 a4 2e 23 65 00 00 |........|"...#e..|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 00 00 0a 9f 00 02 | 00 00 00 00 00 00 00 00 |........|........|
|00000700| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000720| 00 00 00 00 00 00 00 06 | 00 04 00 2a 00 03 01 53 |........|...*...S|
|00000730| 01 fd 00 8c 00 14 01 53 | 01 bd a6 e0 04 c3 00 00 |.......S|........|
|00000740| 02 1c 00 00 02 1c 00 00 | 01 78 01 00 00 00 00 1e |........|.x......|
|00000750| 00 2a 00 03 01 53 01 fd | 00 8c 00 14 01 53 01 bd |.*...S..|.....S..|
|00000760| 00 00 01 78 00 00 00 00 | 00 00 00 00 00 00 00 00 |...x....|........|
|00000770| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 57 |.....n..|.n...>.W|
|00000780| 1a 60 07 b8 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |.`......|.>..MPSR|
|00000790| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|000007a0| 03 f0 ff ff 00 00 00 4c | 00 59 18 44 00 00 00 00 |.......L|.Y.D....|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+